﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain
{
    [Table("Role")]
    public class Role
    {
        public Role() { }
        public Role(string? roleName, string? roleModified, string? roleCreator)
        {
            RoleName = roleName;
            RoleModified = roleModified;
            RoleCreator = roleCreator;
            RoleCreateDate = DateTime.Now;
            RoleModifyDate = DateTime.Now;
        }

        public void Change(string? roleName, string? roleModified)
        {
            this.RoleName = roleName;
            this.RoleModified = roleModified;
        }
        [Key]
        public int ID { get; set; }
        public string? RoleName { get; set; }

        public string? RoleModified { get; set; }

        public string? RoleCreator { get; set; }

        public DateTime? RoleCreateDate { get; set; }

        public DateTime? RoleModifyDate { get; set; }
    }
}